class CreateTimelineBandInfos < ActiveRecord::Migration
  def self.up
    create_table :timeline_band_infos do |t|
    
     t.integer :timeline_config_id
     t.string :name
     t.text :description
     t.integer :width
     t.string :intervalUnit
     t.string :eventSource
     t.string :event_source_url
     t.string :timezone
     t.string :adv_ether
     t.string :adv_ether_interval
     t.string :adv_ether_pixelperinterval
     t.string :adv_ether_centerson
     t.string :adv_ether_painter
     t.string :adv_ether_painter_unit
     t.string :adv_ether_painter_theme
     t.string :adv_event_painter
     t.string :adv_event_painter_showtext
     t.string :adv_event_painter_theme
     t.string :adv_event_painter_trackGap
     t.string :adv_event_painter_layout
      t.timestamps
    end


    execute "alter table timeline_band_infos
               add constraint fk_timeline_band_infos_timeline_configs
               foreign key  (timeline_config_id) references timeline_configs(id)"

  end

  def self.down
    drop_table :timeline_band_infos
  end
end
